private subroutine SetWetland(iniDB, inifile)
set wetland for soilwater balance
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
type(IniList),
|
intent(in) |
|
|
:: |
iniDB |
|
character(len=*),
|
intent(in) |
|
|
:: |
inifile |
|
Variables
Type |
Visibility | Attributes |
|
Name |
| Initial | |
integer(kind=short),
|
public |
|
:: |
k |
|
|
|
type(Table),
|
public |
|
:: |
wetlandTable |
|
|
|
Source Code
SUBROUTINE SetWetland &
!
(iniDB, inifile)
IMPLICIT NONE
! Arguments with intent(in):
TYPE (IniList), INTENT(IN) :: iniDB
CHARACTER (LEN = *), INTENT(IN) :: inifile
!Local declaration:
TYPE (Table) :: wetlandTable
INTEGER (KIND = short) :: k
!------------end of declaration------------------------------------------------
IF (SectionIsPresent('wetland', iniDB)) THEN
CALL GridByIni (iniDB, wetland, section = 'wetland')
!read table of flooded period
CALL TableNew ( inifile, wetlandTable )
!allocate arrays
ALLOCATE ( wetCode ( TableGetNrows(wetlandTable) ) )
ALLOCATE ( wetBegin ( TableGetNrows(wetlandTable) ) )
ALLOCATE ( wetEnd ( TableGetNrows(wetlandTable) ) )
!fill in arrays
DO k = 1, TableGetNrows(wetlandTable)
wetCode (k) = StringToShort ( wetlandTable % col(1) % row(k) )
wetBegin (k) = wetlandTable % col(2) % row(k)
wetEnd (k) = wetlandTable % col(3) % row(k)
END DO
END IF
RETURN
END SUBROUTINE SetWetland